import { createStore } from 'vuex'

export default createStore({
  state: {
    playlists: [
      {
        al: {
          id: 27646205,
          pic: '109951163200249250',
          picUrl: 'https://p2.music.126.net/GcRunGm02vZBicYmIN6GXw==/109951163200249252.jpg',
          pic_str: '109951163200249252'
        },
        name: '安和桥',
        id: 27646205,
        ar: [{
          name: '宋冬野'
        }]
      }],
    isEjected: false, // 是否弹出
    playSongIndex: 0,
    isPlaying: false
  },
  getters: {
  },
  mutations: {
    setPlaylists: function (state, value) {
      state.isPlaying = value
    },
    setSongList: function (state, value) {
      state.playlists = value
    },
    setPlaySongIndex: function (state, value) {
      state.playSongIndex = value
    },
    setEjectedState: function (state, value) {
      state.isEjected = value
    }
  },
  actions: {
  },
  modules: {
  }
})
